package me.exchange.com.modules.system.domain;

import com.amazonaws.services.dynamodbv2.xspec.N;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * 上传成功后，存储结果
 * @author Zheng Jie
 * @date 2018-12-31
 */
@Getter
@Setter
@Entity
@Table(name = "sys_file_content")
@org.hibernate.annotations.Table(appliesTo = "sys_file_content",comment="七牛上传信息表")
public class FileContent implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(name = "id",value = "ID",required = false)
    private Long id;

    /** 文件名 */
    @Column(name = "name")
    @ApiModelProperty(name = "key",value = "文件名",required = false)
    private String key;

    /** 文件名 */
    @Column(name = "real_name")
    @ApiModelProperty(name = "realName",value = "原文件名称",required = false)
    private String realName;

    /** 空间名 */
    @Column(name = "bucket")
    @ApiModelProperty(name = "bucket",value = "bucket标识符",required = false)
    private String bucket;

    /** 大小 */
    @Column(name = "size")
    @ApiModelProperty(name = "size",value = "文件大小",required = false)
    private String size;

    /** 文件地址 */
    @Column(name = "url")
    @ApiModelProperty(name = "url",value = "文件url",required = false)
    private String url;

    @Column(name = "suffix")
    @ApiModelProperty(name = "suffix",value = "suffix",required = false)
    private String suffix;

    /** 空间类型：公开/私有 */
    @Column(name = "type")
    @ApiModelProperty(name ="type",value = "文件类型：私有或公开",required = false)
    private String type = "公开";

    @UpdateTimestamp
    @Column(name = "u_admin_time")
    @ApiModelProperty(name = "uAdminTime",value = "修改时间",required = false)
    private Timestamp uAdminTime;

    @Column(name = "update_time")
    @ApiModelProperty(name = "updateTime",value = "上传或者同步时间")
    private Timestamp updateTime;
}
